Skip to main content
Version: 0.11.3

SimpleFitMultivariateAnomaly

from synapse.ml.cognitive import *

anomalyKey = os.environ.get("ANOMALY_API_KEY", getSecret("anomaly-api-key"))
startTime = "2021-01-01T00:00:00Z"
endTime = "2021-01-03T01:59:00Z"
timestampColumn = "timestamp"
inputColumns = ["feature0", "feature1", "feature2"]
intermediateSaveDir = "wasbs://madtest@anomalydetectiontest.blob.core.windows.net/intermediateData"

simpleFitMultivariateAnomaly = (SimpleFitMultivariateAnomaly()
.setSubscriptionKey(anomalyKey)
.setLocation("westus2")
.setOutputCol("result")
.setStartTime(startTime)
.setEndTime(endTime)
.setIntermediateSaveDir(intermediateSaveDir)
.setTimestampCol(timestampColumn)
.setInputCols(inputColumns)
.setSlidingWindow(50))

# uncomment below for fitting your own dataframe
# model = simpleFitMultivariateAnomaly.fit(df)
# simpleFitMultivariateAnomaly.cleanUpIntermediateData()
Python API: SimpleFitMultivariateAnomalyScala API: SimpleFitMultivariateAnomalySource: SimpleFitMultivariateAnomaly